<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Template{

    protected $ci;

    public function make_template($data, $title){
        $ci =& get_instance();
		
		$ci->load->view('view_header',$title);
		
		 if ($ci->session->userdata('is_logged_in') and $ci->session->userdata('admin')){
			$ci->load->view('view_navigation_admin');
			}
		else{
			if ($ci->session->userdata('is_logged_in')){
				$ci->load->view('view_navigation_user');
			}
			else {
				$ci->load->view('view_navigation_notSigned');	
			}
		}


        $ci->load->view('view_'.$title, $data);

        $ci->load->view('view_footer');

    }

}

/* End of file template.php */
/* Location: ./application/libraries/template.php */



